<!--<meta http-equiv="refresh" content="1"/>-->
<link href="__PUBLIC__/Admin/css/same.css"  type="text/css" rel="stylesheet"/>
<script src="__PUBLIC__/js/jquery-1.11.3.min.js" type="text/javascript"></script>
<link href="__PUBLIC__/css/bootstrap.css"  type="text/css" rel="stylesheet"/>
<script src="__PUBLIC__/js/bootstrap.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/layer/layer.js" type="text/javascript"></script>
<script src="__PUBLIC__/Admin/js/BookEntering.js" type="text/javascript"></script>
<div class="a-main-left-content">
    <div class="a_con_title">
        <h4>书籍编辑</h4>
    </div>
    <div class="a_title_tip">
        <img class="a_record_icon" src="/Public/img/record_01.jpg"/>
        <span class="a_record_news">请认真核对数据，以免出现问题。</span>
    </div>

    <div class="enter_box">
        <form action="{:U('Admin/BookManage/bookShowSave')}" method="post">
            <div class="enter_min_box book_save_show">
                <div class="enter_span">
                    <span><c>*</c>图书名称：</span>
                </div>
                <div class="enter_input">
                    <input type="text" name="book_name" id="book_name" value="{$_getBookSaveInfo['book_name']} ">
                    <button type="button" id="enter_create1" class="check"  data-book-id="{$_getBookSaveInfo['book_id']}">名称校验</button>
                    <input type="hidden" value="{:U('Admin/BookManage/getBookNamecheck')}" id="check-url">
                </div>
            </div>
            <div class="enter_min_box book_save_show">
                <div class="enter_span">
                    <span>图书类型：</span>
                </div>
                <select name="book_type_id">
                    <volist name="_getBookTypeTableInfo" id="vo">
                        <option value="{$vo['book_type_id']}" <if condition=" $_getBookSaveInfo['book_type_id'] eq  $vo['book_type_id']">selected</if> >{$vo['book_type_name']}</option>
                    </volist>
                </select>
            </div>
            <div class="enter_min_box book_save_show">
                <div class="enter_span">
                    <span>出版社：</span>
                </div>
                <select name="book_isbn_id">
                    <volist name="_getBookIsbnTableInfo" id="fo">
                        <option value="{$fo['book_isbn_id']}" <if condition=" $_getBookSaveInfo['book_isbn_id'] eq  $fo['book_isbn_id']">selected</if> >{$fo['book_isbn_name']}</option>
                    </volist>
                </select>
            </div>
            <div class="enter_min_box book_save_show">
                <div class="enter_span">
                    <span>书架名称：</span>
                </div>
                <select name="book_case_id">
                    <volist name="_getBookCaseTableInfo" id="zo">
                        <option value="{$zo['book_case_id']}" <if condition=" $_getBookSaveInfo['book_case_id'] eq  $zo['book_case_id']">selected</if>  >{$zo['book_case_name']}</option>
                    </volist>
                </select>
            </div>
            <div class="enter_min_box book_save_show" >
                <div class="enter_span">
                    <span><c>*</c>条形码：</span>
                </div>
                <input type="text" name="book_barcode" readonly="" value="{$_getBookSaveInfo['book_barcode']}" class="record_save_color" id="input_create">
                <!--<button type="button" id="enter_create" onclick="randomkeys()">随机生成</button>-->
            </div>
            <div class="enter_min_box book_save_show">
                <div class="enter_span">
                    <span><c>*</c>图书作者：</span>
                </div>
                <input type="text" name="book_author" value="{$_getBookSaveInfo['book_author']}">
            </div>
            <div class="enter_min_box book_save_show">
                <div class="enter_span">
                    <span>图书翻译者：</span>
                </div>
                <input type="text" name="book_translator" value="{$_getBookSaveInfo['book_translator']}">
            </div>
            <div class="enter_min_box book_save_show">
                <div class="enter_span">
                    <span><c>*</c>图书价格：</span>
                </div>
                <input type="text" name="book_price"  onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')" value="{$_getBookSaveInfo['book_price']}">
                <span>(单位：元)</span>
            </div>
            <div class="enter_min_box book_save_show">
                <div class="enter_span">
                    <span><c>*</c>剩余数量：</span>
                </div>
                <input type="text" name="book_number" onkeyup="value=this.value.replace(/\D+/g,'')" value="{$_getBookSaveInfo['book_number']}">
                <span>(单位：本)</span>
            </div>
            <div class="enter_min_box book_save_show">
                <div class="enter_span">
                    <span>借阅数量：</span>
                </div>
                <input type="text" name="book_borrow" onkeyup="value=this.value.replace(/\D+/g,'')" value="{$_getBookSaveInfo['book_borrow']}" readonly="" class="record_save_color" >
                <span>(单位：本)</span>
            </div>
            <div class="enter_min_box book_save_show">
                <div class="enter_span">
                    <span>销售数量：</span>
                </div>
                <input type="text" name="buy_book_number" onkeyup="value=this.value.replace(/\D+/g,'')" value="{$_getBookSaveInfo['buy_book_number']}" readonly="" class="record_save_color" >
                <span>(单位：本)</span>
            </div>
            <div class="enter_min_box book_save_show">
                <div class="enter_span">
                    <span>录入者名称：</span>
                </div>
                <div class="xiu_gai record_save_color">
                    <volist name="_getAdminAllInfo" id="qo">
                        <if condition=" $_getBookSaveInfo['a_id'] eq  $qo['a_id']">{$qo['a_name']}</if>
                    </volist>
                </div>
            </div>
            <div class="enter_min_box book_save_show">
                <div class="enter_span">
                    <span>录入时间：</span>
                </div>
                <input type="text" name="book_intime" value="{$_getBookSaveInfo['book_intime']|date='Y-m-d H:i:s',###}" readonly="" class="record_save_color">
            </div>
            <div class="enter_min_box book_save_show">
                <div class="enter_span">
                    <span>图书状态：</span>
                </div>
                <div class="xiu_gai record_save_color">
                    <if condition="$_getBookSaveInfo['book_del'] eq 1">
                        上架
                        <else/>
                        下架
                    </if>
                </div>
            </div>
            <div class="enter_submit">
                <input type="submit" value="修&nbsp;改">
            </div>
        </form>
    </div>
</div>
<script type="text/javascript">
    function randomkeys(){
        var rnd="";
        for(var i=0;i<4;i++){
            rnd+=Math.floor(Math.random()*1000000).toString(16);
        }
        document.getElementById('input_create').value=rnd;
    }
</script>